﻿#ifndef PUBLIC_H
#define PUBLIC_H

#include "cv.h"
#include "../DIB/dib.h"
#include <stdio.h>

/*
 *定义系统各模块的ID号
 */
#define MON_MOD		1
#define ATM_MOD		2
//模块数
#define MODNUM 		2

/*
 * 通讯端口号
 */
#define BASE_PORT 	5000
//TCP端口
//#define MON_PORT 		(BASE_PORT+ MON_MOD)
//#define ATM_PORT 		(BASE_PORT+ ATM_MOD)

//UDP端口
#define MON_UDPPORT		(BASE_PORT+ MON_MOD+ 1)
#define ATM_UDPPORT 	(BASE_PORT+ ATM_MOD+ 1)

#define	MSG_HELLO		100		//心跳信号

void WriteFile(const char* filename, char* data, int len);

IplImage* cvCvtDIB2IMG(CDIB * pDib);
CDIB* cvCvtIMG2DIB(IplImage * pImg);

#endif //PUBLIC_H

